-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[python-package] allow use of early_stopping_round<=0 to turn off early stopping (fixes #6401) #6406
[python-package] allow use of early_stopping_round<=0 to turn off early stopping (fixes #6401) #6406
Conversation
@microsoft-github-policy-service agree company="Grubhub" |
Thanks! I've added the statement "fixes #6401" to the description. In case you're not familiar with GitHub... that's helpful for 2 reasons:
More details on that: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue |
Ah, looks like I forgot to run some linting pre-commit hooks? I can try to fix those. Also, we typically rebase to one commit in our PRs as we make changes. Do you have any problem with that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for doing this! I left one comment for you to consider. Will try to provide a more thorough review later.
Yep. You can do this from the root of the repo to run them. pip install pre-commit
pre-commit run --all-files
We squash all commits into 1 when merging here, so we end up with 1 commit per PR. Check this out: https://github.com/microsoft/LightGBM/commits/master/ Because of that:
So please don't rebase and force-push here. It's useful for reviewers to be able to see the individual changes being made in response to review comments, and all the CI logs are tied to commits so it's useful to be able to compare consecutive CI runs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for this! The tests look great, I just left some small suggestions. This is pretty close, and we'll get it into the next release.
Thanks for the changes! I've updated this to the latest state of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much, we'd love to have you come back and contribute again in the future!
Thanks, James! Great process, I learned a lot and your reviews were incredibly thorough. |
@jameslamb Do you know when the next release is scheduled to be? |
We're hoping to do one within the next month... but we're battling severe issues in CI right now 😭 (#6425). |
OH NO. Thank you for the reply, that's helpful to know. |
Fixes #6401
The early stopping callback was instantiated if
early_stopping_round
was found in the parameter list, even its values was <=0 (which should disable early stopping). The code was modified to only instantiate the early stopping callback ifearly_stopping_round
was both an integer and >0.Various error messages were updated and unit tests were added.